{% extends '::backend.html.twig' %}
{% block contenido %}
{% block documentReadyJavascript %} 
    {{ parent() }}
    <script type="text/javascript" >
        $(".delete").on('click', function(e){
                e.preventDefault()
                $this = $(this);
                $("#confirmation-dialog").dialog({
                resizable: false,
                height:180,
                width:'auto',
                modal: true,
                title:"Alerta!",
                buttons: {
                    "Eliminar": function() {
                        $this.parent().submit();
                    },
                    Cancelar: function() {
                        $( this ).dialog( "close" );
                    }
                }
            });
        });
    </script>
{% endblock documentReadyJavascript %}
{% include 'BackendBundle:Default:flashAlerts.html.twig'%}
<legend>Listado de Roles</legend>
<table class="table table-striped table-bordered table-striped table-hover">
    <thead>
        <tr>
           
            <th>Rol</th>
           
        </tr>
    </thead>
    <tbody>
        {% for entity in entities %}
        <tr>
        
            <td>{{ entity.name }}</td>
            <td valign="middle" align="center">
                {#% include 'BackendBundle:Default:accionesConPermisos.html.twig' with {'basePath':'role','esEditor':true}%#}
            </td>
        </tr>
        {% endfor %}
    </tbody>
</table>
{% include 'BackendBundle:Default:paginador.html.twig' with { 'ruta': 'role' } only %}
<!--<div class="form-actions">
     <a class="btn  btn-success" href="{{ path('role_new') }}">
        <i class="icon-plus" ></i> Agregar Rol
    </a>
</div>-->
<div id="confirmation-dialog" style="display:none">
    <div class="alert alert-error">
        <strong>Borrara!</strong>  el rol por completo, está seguro?
    </div>
</div>
{% endblock %}
